
class  Animal{
    public int age = 99;
    public String name;
    public Animal(String name){
        this.name = name;

        System.out.println(name);//构造方法 用于初始化
    }
    public void eat(){
        System.out.println("正在吃饭");
    }
    static {

        System.out.println("ooooooooooooo");
    }

        }
 class Dog extends Animal{
    int age = 55;
    public Dog(String name){
        super(name);
    }
    public void play(){
        System.out.println(name + "正在玩飞盘");
        System.out.println(super.age);
    }

 }
/*class Cat extends Animal{
    public void play(){
        System.out.println(name + "正在玩毛线");
    }
}*/


public class Test {
    public static void main(String[] args) {
        Dog dog = new Dog("xiaoMing");

       /* dog.name = "xiaoMing";
        dog.age = 11;*/
       dog.play();
        /*System.out.println(dog.age);*/
        System.out.println("===========");
       /* Cat cat = new Cat();
        cat.age = 45;
        cat.name = "mimi";
        System.out.println(cat.age);
        cat.play();
        cat.eat();*/

    }
}


